use crate::bootstrap::AppState;
use crate::controller::admin::order;
use axum::{
    routing::{delete, get, post, put},
    Router,
};
use utoipa::OpenApi;

// #[derive(OpenApi)]
// #[openapi(paths(category::modify_by_id))]
// pub(super) struct CategoryApi;

pub fn order_router(state: AppState) -> Router<AppState> {
    let router = Router::new()
        .route("/cancel", put(order::cancel))
        .route("/statistics", get(order::statistics))
        .route("/complete/:id", put(order::complete))
        .route("/rejection", put(order::rejection))
        .route("/confirm", put(order::confirm))
        .route("/details/:id", get(order::details))
        .route("/delivery/:id", put(order::delivery))
        .route("/conditionSearch", get(order::condition_search))
        .with_state(state);

    router
}
